/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class PalabraDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression pal_id;
	public final StringExpression pal_desencriptada;
	public final StringExpression pal_encriptada;
	
	public PalabraDetachedCriteria() {
		super(orm.Palabra.class, orm.PalabraCriteria.class);
		pal_id = new IntegerExpression("pal_id", this.getDetachedCriteria());
		pal_desencriptada = new StringExpression("pal_desencriptada", this.getDetachedCriteria());
		pal_encriptada = new StringExpression("pal_encriptada", this.getDetachedCriteria());
	}
	
	public PalabraDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.PalabraCriteria.class);
		pal_id = new IntegerExpression("pal_id", this.getDetachedCriteria());
		pal_desencriptada = new StringExpression("pal_desencriptada", this.getDetachedCriteria());
		pal_encriptada = new StringExpression("pal_encriptada", this.getDetachedCriteria());
	}
	
	public Palabra uniquePalabra(PersistentSession session) {
		return (Palabra) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Palabra[] listPalabra(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Palabra[]) list.toArray(new Palabra[list.size()]);
	}
}

